﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="order_list.aspx.cs" Inherits="SF.Ucenter.admin.order.order_list" %>

<!DOCTYPE html>

<%--订单查询表--%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <title>商品订单表</title>
    <link href="../../scripts/artdialog/ui-dialog.css" rel="stylesheet" type="text/css" />
    <link href="../skin/default/style.css" rel="stylesheet" type="text/css" />
    <link href="../../css/pagination.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" charset="utf-8" src="../../scripts/jquery/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../scripts/artdialog/dialog-plus-min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../scripts/datepicker/WdatePicker.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/laymain.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/common.js"></script>

    <style type="text/css">
        .toolbar .l-list .icon-list {
            margin-top: 7px;
        }

        .keywordtip {
            display: block;
            float: left;
            margin: 0;
            padding: 0 5px;
            height: 30px;
            line-height: 28px;
            font-size: 12px;
            color: #444;
        }
    </style>
</head>

<body class="mainbody">
    <form id="form1" runat="server">
        <!--导航栏-->
        <div class="location">
            <a href="javascript:history.back(-1);" class="back"><i></i><span>返回上一页</span></a>
            <a href="../First.aspx" class="home"><i></i><span>首页</span></a>
            <i class="arrow"></i>
            <span>订单列表</span>
        </div>
        <!--/导航栏-->

        <!--工具栏-->
        <div id="floatHead" class="toolbar-wrap">
            <div class="toolbar">
                <div class="box-wrap">
                    <div class="l-list">
                        <ul class="icon-list">
                            <li><span>金额：<asp:Label ID="lblTotalMoney" runat="server" /></span></li>
                        </ul>
                        <ul class="icon-list" style="margin-top: 0px;">
                            <li>
                                <%--<asp:LinkButton ID="LinkButton1" runat="server" style="border-left:solid 1px #dbdbdb;cursor:pointer;" CssClass="down" OnClick="btndownExcel_Click"><i></i><span>下载Excel</span></asp:LinkButton>--%>
                            </li>
                            <%--<li>
                                <a style="<%=dis%>" class="lock" href="order_withdrawal.aspx"><i></i><span>提现订单</span></a>
                            </li>--%>
                        </ul>
                        <div class="menu-list">
                            <div class="rule-single-select">
                                <asp:DropDownList ID="ddlPayStatus" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlPayStatus_SelectedIndexChanged">
                                    <asp:ListItem Value="All">支付状态</asp:ListItem>
                                    <asp:ListItem Value="ToPay">待支付</asp:ListItem>
                                    <asp:ListItem Value="DonePay">已支付</asp:ListItem>
                                    <%-- <asp:ListItem Value="ToRefund">待退款</asp:ListItem>
                                    <asp:ListItem Value="DoneRefund">已退款</asp:ListItem>--%>
                                </asp:DropDownList>
                            </div>
                            <div class="rule-single-select">
                                <asp:DropDownList ID="ddlPayWay" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlPayWay_SelectedIndexChanged">
                                    <asp:ListItem Value="All">支付方式</asp:ListItem>
                                    <asp:ListItem Value="WxPay">微信支付</asp:ListItem>
                                    <asp:ListItem Value="BankPay">银行转账</asp:ListItem>
                                    <asp:ListItem Value="Cod">货到付款</asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="rule-single-select">
                                <asp:DropDownList ID="ddlExpressStatus" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlExpressStatus_SelectedIndexChanged">
                                    <asp:ListItem Value="All">物流状态</asp:ListItem>
                                    <asp:ListItem Value="ToSend">待发货</asp:ListItem>
                                    <asp:ListItem Value="DoneSend">已发货</asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="rule-single-select">
                                <asp:DropDownList ID="ddlBalanceStatus" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlBalanceStatus_SelectedIndexChanged">
                                    <asp:ListItem Value="All">结算状态</asp:ListItem>
                                    <asp:ListItem Value="ToBalance">待结算</asp:ListItem>
                                    <asp:ListItem Value="DoneBalance">已结算</asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="rule-single-select">
                                <asp:DropDownList ID="ddlOrderStatus" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlOrderStatus_SelectedIndexChanged">
                                    <asp:ListItem Value="All">订单状态</asp:ListItem>
                                    <asp:ListItem Value="Normal">正常</asp:ListItem>
                                    <asp:ListItem Value="Cancel">取消</asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>
                    </div>
                    <div class="r-list">
                        <span class="keywordtip">筛选</span>
                        <asp:TextBox ID="txtKeyWords" runat="server" Style="width: 150px;" CssClass="keyword" />
                        <span class="keywordtip">时间</span>
                        <asp:TextBox ID="txtStartTime" runat="server" CssClass="keyword" ReadOnly="true"
                            onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
                        <span class="keywordtip">- </span>
                        <asp:TextBox ID="txtEndTime" runat="server" CssClass="keyword" ReadOnly="true"
                            onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />

                        <asp:LinkButton ID="lbtnSearch" runat="server" CssClass="btn-search" OnClick="btnSearch_Click">查询</asp:LinkButton>
                    </div>
                </div>
            </div>
        </div>
        <!--/工具栏-->

        <!--列表-->
        <asp:Repeater ID="rptList" runat="server">
            <HeaderTemplate>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="ltable">
                    <tr>
                        <th width="1%"></th>
                        <th align="left" width="12%">订单编号</th>
                        <th align="left" width="8%">用户名</th>
                        <th align="left" width="6%">支付方式</th>
                        <th align="left" width="33%">地址信息</th>
                        <th align="center" width="8%">小计</th>
                        <th align="left" width="8%">订单时间</th>
                        <th width="5%">支付状态</th>
                        <th width="5%">物流状态</th>
                        <th width="5%">结算状态</th>
                        <th width="5%">订单状态</th>
                        <th align="left" width="5%">操作</th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td></td>
                    <td><%# Eval("orderNum") %></td>
                    <td><%# Eval("userNum") %></td>
                    <td><%# Eval("payWayCn") %></td>
                    <td title="<%# Eval("receiveInfo").ToString()%>"><%# Eval("receiveInfo").ToString().Length>=40?Eval("receiveInfo").ToString().Substring(0,40)+"...":Eval("receiveInfo").ToString() %></td>
                    <td align="center"><%# Eval("totalPrice") %></td>
                    <td><%#string.Format("{0:g}",Eval("createTime"))%></td>
                    <td class="payStatus" align="center"><%# Eval("payStatusCn") %></td>
                    <td class="expressStatus" align="center"><%# Eval("expressStatusCn") %></td>
                    <td class="balanceStatus" align="center"><%# Eval("balanceStatusCn") %></td>
                    <td class="orderStatus" align="center"><%# Eval("orderStatusCn") %></td>
                    <td><a href="order_Detail.aspx?action=<%#SF.Common.DTEnums.ActionEnum.View %>&id=<%#Eval("id")%>">明细</a></td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                <%#rptList.Items.Count == 0 ? "<tr><td align=\"center\" colspan=\"12\">暂无订单记录</td></tr>" : ""%>
</table>
            </FooterTemplate>
        </asp:Repeater>
        <!--/列表-->


        <!--内容底部-->
        <div class="line20"></div>
        <div class="pagelist">
            <div class="l-btns">
                <span>显示</span><asp:TextBox ID="txtPageNum" runat="server" CssClass="pagenum" onkeydown="return checkNumber(event);" OnTextChanged="txtPageNum_TextChanged" AutoPostBack="True"></asp:TextBox><span>条/页</span>
            </div>
            <div id="PageContent" runat="server" class="default"></div>
        </div>
        <!--/内容底部-->
    </form>
    <script type="text/javascript">
        $(document).ready(function () {
            $(".payStatus").each(function (index, ispay) {
                if ($(this).text() == "待支付") {
                    $(this).css("color", "red");
                } else {
                    $(this).css("color", "green");
                }
            });
            $(".expressStatus").each(function (index, isdone) {
                if ($(this).text() == "待发货") {
                    $(this).css("color", "red");
                } else {
                    $(this).css("color", "green");
                }
            });
            $(".balanceStatus").each(function (index, express) {
                if ($(this).text() == "待结算") {
                    $(this).css("color", "red");
                } else {
                    $(this).css("color", "green");
                }
            });
            $(".orderStatus").each(function (index, express) {
                if ($(this).text() == "取消") {
                    $(this).css("color", "red");
                } else {
                    $(this).css("color", "green");
                }
            });
        });
    </script>
</body>
</html>

